﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace PS.Engine.DataTypes
{
    [XmlRoot("Environment")]
    [XmlInclude(typeof(PedestrianSerializable))]
    [XmlInclude(typeof(PedestrianRandomStartZone))]
    [XmlInclude(typeof(WaypointSerializable))]
    [XmlInclude(typeof(ObstacleSerializable))]
    public class Environment
    {
        [XmlArray("Pedestrians")]
        [XmlArrayItem("Pedestrian")]
        public List<PedestrianSerializable> Pedestrians { get; set; }
        public PedestrianZoneList Zones { get; set; }
        [XmlArray("Waypoints")]
        [XmlArrayItem("Waypoint")]
        public List<WaypointSerializable> Waypoints { get; set; }
        [XmlArray("Obstacles")]
        [XmlArrayItem("Obstacle")]
        public List<ObstacleSerializable> Obstacles { get; set; }

        public Environment()
        {
            Pedestrians = new List<PedestrianSerializable>();
            Zones = new PedestrianZoneList();
            Waypoints = new List<WaypointSerializable>();
            Obstacles = new List<ObstacleSerializable>();
        }
    }
}
